quartz: Remove unused _gdk_quartz_colormap_get_cgcolor_from_pixel()
authorBenjamin Otte <otte@redhat.com>
Sat, 28 Aug 2010 23:51:54 +0000 (01:51 +0200)
committerBenjamin Otte <otte@redhat.com>
Sun, 26 Sep 2010 13:11:33 +0000 (15:11 +0200)
gdk/quartz/gdkcolor-quartz.c
gdk/quartz/gdkprivate-quartz.h

index 9a7884d2be7148b33d80559de8fb21eb21bdb562..c0addafb933d35921b8f68f782dff32680454364 100644 (file)
@@ -148,52 +148,3 @@ gdk_colormap_get_screen (GdkColormap *cmap)
   return gdk_screen_get_default ();
 }
 
-CGColorRef
-_gdk_quartz_colormap_get_cgcolor_from_pixel (GdkDrawable *drawable,
-                                             guint32      pixel)
-{
-  CGFloat components[4] = { 0.0f, };
-  CGColorRef color;
-  CGColorSpaceRef colorspace;
-  const GdkVisual *visual;
-  GdkColormap *colormap;
-
-  colormap = gdk_drawable_get_colormap (drawable);
-  if (colormap)
-    visual = gdk_colormap_get_visual (colormap);
-  else
-    visual = gdk_visual_get_best_with_depth (gdk_drawable_get_depth (drawable));
-
-  switch (visual->type)
-    {
-      case GDK_VISUAL_STATIC_GRAY:
-      case GDK_VISUAL_GRAYSCALE:
-        components[0] = (pixel & 0xff) / 255.0f;
-
-        if (visual->depth == 1)
-          components[0] = components[0] == 0.0f ? 0.0f : 1.0f;
-        components[1] = 1.0f;
-
-        colorspace = CGColorSpaceCreateWithName (kCGColorSpaceGenericGray);
-        color = CGColorCreate (colorspace, components);
-        CGColorSpaceRelease (colorspace);
-        break;
-
-      default:
-        components[0] = (pixel >> 16 & 0xff) / 255.0;
-        components[1] = (pixel >> 8  & 0xff) / 255.0;
-        components[2] = (pixel       & 0xff) / 255.0;
-
-        if (visual->depth == 32)
-          components[3] = (pixel >> 24 & 0xff) / 255.0;
-        else
-          components[3] = 1.0;
-
-        colorspace = CGColorSpaceCreateWithName (kCGColorSpaceGenericRGB);
-        color = CGColorCreate (colorspace, components);
-        CGColorSpaceRelease (colorspace);
-        break;
-    }
-
-  return color;
-}
index 9dc090e60b87c351e899b42e1f0fb64fe6d57d25..ca9eae30b1503651d1754db7e449aa61ebb4513d 100644 (file)
@@ -79,10 +79,6 @@ typedef enum {
   GDK_QUARTZ_CONTEXT_TEXT   = 1 << 2
 } GdkQuartzContextValuesMask;
 
-/* Colormap */
-CGColorRef _gdk_quartz_colormap_get_cgcolor_from_pixel (GdkDrawable *drawable,
-                                                        guint32      pixel);
-
 /* Window */
 gboolean    _gdk_quartz_window_is_ancestor          (GdkWindow *ancestor,
                                                      GdkWindow *window);